<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
</head>

<!-- jQuery -->
<script src="  js/external/jquery-3.4.1.min.js" type="text/javascript" charset="utf-8"></script>
<!-- DataTables -->
<link rel="stylesheet" type="text/css" href="  css/external/dataTables.bootstrap.css"/>
<script src="  js/external/jquery.dataTables.min.js" type="text/javascript" charset="utf-8"></script>
<script src="  js/external/dataTables.bootstrap.js" type="text/javascript" charset="utf-8"></script>
<!--界面库 bootstrap-->
<link rel="stylesheet" type="text/css" href="  css/external/bootstrap.min.css"/>
<script src="  js/external/bootstrap.min.js" type="text/javascript" charset="utf-8"></script>
<link rel="stylesheet" type="text/css" href="  css/index.css"/>
<script type="text/javascript" src="  js/utils.js"></script>
<script type="text/javascript" src="  js/customer.js"></script>
<script type="text/javascript">
    //页面加载便调用方法
    window.onload = refreshData;
	function toLogin(){
	    window.location.href = "login.html";
    }
</script>
<body>
<div>
    客户ID：<input id="selectId" value=""/>
    客户姓名：<input id="selectName" value=""/>
    <br>
    客户行业：
    <select id="selectIndustry">
        <option value="">请选择</option>
        <option value="1">教育培训</option>
        <option value="2">电子商务</option>
        <option value="3">对外贸易</option>
        <option value="4">酒店旅游</option>
        <option value="5">房地产</option>
    </select>
    客户级别：
    <select id="selectLevel">
        <option value="">请选择</option>
        <option value="6">VIP用户</option>
        <option value="7">普通用户</option>
    </select>
    客户电话：<input id="selectMobile" value=""/>
    <button type="button" class="btn btn-primary" onclick="refreshData()">查询</button>
    <button type="button" class="btn btn-primary" onclick="addDataDialog()">新增</button>
    <button type="button" class="btn btn-primary" onclick="refreshData()">刷新</button>
    <form action="/customer/download" class="btn btn-primary" method="get">
        <button type="submit">下载</button>
    </form>
</div>

<br>

<table id="customerList" class="table table-striped">
    <thead>
    <tr>
        <th>客户ID</th>
        <th>客户姓名</th>
        <th>客户所属行业</th>
        <th>客户级别</th>
        <th>客户电话</th>
        <th>创建时间</th>
        <th>操作</th>
    </tr>
    </thead>
</table>

<!-- 新增对话框 -->
<div class="modal" id="addCustomerDialog">
    <!-- modal默认是隐藏的 -->
    <div class="modal-dialog">
        <div class="modal-content">
            <!-- 头部关闭按钮 -->
            <div class="modal-header">
                <button type="button" class="close myclose" data-dismiss="modal"><span>&times</span></button>
                <div class="h3 modal-title">新增人员信息</div>
                <!-- 内容部分 -->
                <div class="modal-body">
                    <div class="form-group">
                        <label >客户名称</label>
                        <input type="text" class="form-control" name="custName" placeholder="姓名">
                    </div>
                    <div class="form-group">
                        <p>上传照片</p>
                        <div class="san3">
                            <input type="file" name="file" id="file" onchange="showImg(this)"><!--选择图片-->
                        </div>
                    </div>
                    <div class="form-group">
                        <label >客户所属行业</label>
                        <br>
                        <select name="custIndustry">
                            <option >请选择</option>
                            <option value ="1">教育培训</option>
                            <option value ="2">电子商务</option>
                            <option value ="3">对外贸易</option>
                            <option value ="4">酒店旅游</option>
                            <option value ="5">房地产</option>
                        </select>
                    </div>
                    <div class="form-group">
                        <label >客户电话</label>
                        <input type="text" class="form-control" name="custMobile" placeholder="电话">
                    </div>
                    <div class="form-group">
                        <label >客户级别</label>
                        <br>
                        <select name="custLevel" >
                            <option >请选择</option>
                            <option value ="6">VIP客户</option>
                            <option value ="7">普通客户</option>
                        </select>
                    </div>
                    <div class="form-group">
                        <label >客户创建时间</label>
                        <input type="text" class="form-control" name="custCreateTime" placeholder="创建时间">
                    </div>
                    <div class="form-group addDataPlane">
                        <button class="btn btn-default navbar-right" onclick="addData()">确定</button>
                         <button class="btn btn-default " data-dismiss="modal" aria-hidden="true">取消</button>
                    </div>

                </div>
            </div>
        </div>
    </div>
</div>

<div class="modal" id="modifyCustomerDialog">
    <!-- modal默认是隐藏的 -->
    <div class="modal-dialog">
        <div class="modal-content">
            <!-- 头部关闭按钮 -->
            <div class="modal-header">
                <button type="button" class="close myclose" data-dismiss="modal"><span>&times</span></button>
                <div class="h3 modal-title">修改人员信息</div>
                <!-- 内容部分 -->
                <div class="modal-body">
                    <div class="form-group">
                        <label >客户名称</label>
                        <input type="text" class="form-control" name="custName1" placeholder="姓名">
                    </div>
                    <div class="form-group">
                        <label >客户所属行业</label>
                        <br>
                        <select name="custIndustry1">
                            <option value ="0">请选择</option>
                            <option value ="1">教育培训</option>
                            <option value ="2">电子商务</option>
                            <option value ="3">对外贸易</option>
                            <option value ="4">酒店旅游</option>
                            <option value ="5">房地产</option>
                        </select>
                    </div>
                    <div class="form-group">
                        <label >客户电话</label>
                        <input type="text" class="form-control" name="custMobile1" placeholder="电话">
                    </div>
                    <div class="form-group">
                        <label >客户级别</label>
                        <br>
                        <select name="custLevel1" >
                            <option value="0">请选择</option>
                            <option value ="6">VIP客户</option>
                            <option value ="7">普通客户</option>
                        </select>
                    </div>
<!--                    <div class="form-group">-->
<!--                        <label >客户创建时间</label>-->
<!--                        <input type="text" class="form-control" name="custCreateTime1" placeholder="工作">-->
<!--                    </div>-->
                    <div class="form-group addDataPlane">
                        <button class="btn btn-default navbar-right" onclick="modifyData()">确定</button>
                        <button class="btn btn-default " data-dismiss="modal" aria-hidden="true">取消</button>
                    </div>

                </div>
            </div>
        </div>
    </div>
</div>

<!-- 查看对话框 -->
<div class="modal" id="queryCustomerDialog">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close myclose" data-dismiss="modal"><span>&times</span></button>
                <div class="h3 modal-title">客户信息</div>
                <div class="modal-body">
                    <div>
                        <label>客户照片:</label>
                        <img src="#" id="custPhoto" width="100" height="120">
                    </div>
                    <div>
                        <label>客户姓名:</label>
                        <span id="custName"></span>
                    </div>
                    <div>
                        <label>客户行业：</label>
                        <span id="custIndustry"></span>
                    </div>
                    <div>
                        <label>客户级别：</label>
                        <span id="custLevel"></span>
                    </div>
                    <div>
                        <label>客户电话:</label>
                        <span id="custMobile"></span>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-primary myclose" data-dismiss="modal">关闭</button>
                </div>
            </div>
        </div>
    </div>
</div>



<div class="modal" id="editDialog">
			<!-- modal默认是隐藏的 -->
			<div class="modal-dialog">
				<div class="modal-content">
					<!-- 头部关闭按钮 -->
					<div class="modal-header">
						<button type="button" class="close myclose" data-dismiss="modal"><span>&times</span></button>
						<div class="h3 modal-title">修改内容</div>
						<!-- 内容部分 -->
						<div class="modal-body">
							<P>这是内容部分</P>
						</div>
						<!-- 页脚 -->
						<div class="modal-footer">
							<button type="button" class="btn btn-primary myclose" data-dismiss="modal">关闭</button>

						</div>
					</div>
				</div>
			</div>
		</div>
	<!-- 分类删除模态框 -->

    <div class="modal small fade" id="delCustomerDialog" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                    <h3 id="myModalLabel">删除确认</h3>
                </div>
                <div class="modal-body">
                    <h4 style="text-align:center;">
                        <i class="fa fa-warning modal-fa" style="color:#ff0000;"></i> 您确认要删除该客户信息吗？
                    </h4>
                </div>
                <div class="modal-footer">
                    <button class="btn btn-danger" id="delButton" data-account="" data-complete-text="正在删除..." >删除</button>
                    <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">取消</button>
                </div>
            </div>
        </div>
　　</div>
</body>

<script type="text/javascript" src="  js/utils.js"></script>
<script type="text/javascript" src="  js/customer.js"></script>
</html>
